//package com.xiguaji.tiktok.task.ranking.repository;
//
//import com.xiguaji.tiktok.task.ranking.model.RankingFollowers;
//import org.springframework.data.jdbc.repository.query.Query;
//import org.springframework.data.repository.CrudRepository;
//import org.springframework.stereotype.Repository;
//
//import java.util.List;
//
//@Repository
//public interface RankingFollowersRepository extends CrudRepository<RankingFollowers,Long>,RankingFollowersExtRepository {
//
//    List<RankingFollowers> findByBloggerTypeAndRankingTypeAndBelong(long bloggerType,long rankingType,int belong);
//
//
//    @Query("SELECT id,blogger_type,ranking_type,blogger_id,uid,nickname,unique_id,avatar,state,position," +
//            "(select o_follower_count from blogger_main where o_uid = uid) as follower,belong," +
//            " SUM(follower_growth) AS follower_growth " +
//            "FROM ranking_followers " +
//            "WHERE blogger_type = :bloggerType and ranking_type = :rankingType and belong  BETWEEN :firstDate and :lastDate " +
//            "group by uid " +
//            "order by SUM(follower_growth) desc")
//    List<RankingFollowers> findRankingFollowers(long bloggerType, int rankingType, int firstDate, int lastDate);
//}
